// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addBorrowRecord POST /api/borrowRecord/add */
export async function addBorrowRecordUsingPost(
  body: API.BorrowRecordAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/borrowRecord/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteBorrowRecord POST /api/borrowRecord/delete */
export async function deleteBorrowRecordUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/borrowRecord/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getBorrowRecordVOById GET /api/borrowRecord/get/vo */
export async function getBorrowRecordVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getBorrowRecordVOByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBorrowRecordVO_>('/api/borrowRecord/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listBorrowRecordVOByPage POST /api/borrowRecord/list/page/vo */
export async function listBorrowRecordVoByPageUsingPost(
  body: API.BorrowRecordQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageInfoBorrowRecordVO_>('/api/borrowRecord/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listMyBorrowRecordVOByPage POST /api/borrowRecord/my/list/page/vo */
export async function listMyBorrowRecordVoByPageUsingPost(
  body: API.BorrowRecordQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageInfoBorrowRecordVO_>('/api/borrowRecord/my/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateBorrowRecord POST /api/borrowRecord/update */
export async function updateBorrowRecordUsingPost(
  body: API.BorrowRecordUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/borrowRecord/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
